package com.yunhe.assist.repository;

import com.yunhe.assist.domain.FeedbackReply;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @description feedback_reply
 * @author dlz
 * @date 2021-11-09
 */
@Repository
public interface FeedbackReplyRepository {

    /**
     * 新增
     * @author dlz
     * @date 2021/11/09
     **/
    int createFeedbackReply(FeedbackReply feedbackReply);

    /**
     * 新增
     * @author dlz
     * @date 2021/11/09
     **/
    int createFeedbackReplySelective(FeedbackReply feedbackReply);

    /**
     * 刪除
     * @author dlz
     * @date 2021/11/09
     **/
    int deleteFeedbackReplyByPrimaryKey(@Param("id") int id);

    /**
     * 更新
     * @author dlz
     * @date 2021/11/09
     **/
    int updateFeedbackReplyByPrimaryKey(FeedbackReply feedbackReply);

    /**
     * 更新
     * @author dlz
     * @date 2021/11/09
     **/
    int updateFeedbackReplyByPrimaryKeySelective(FeedbackReply feedbackReply);

    /**
     * 根据主键查询
     * @author dlz
     * @date 2021/11/09
     **/
    FeedbackReply searchFeedbackReplyByPrimaryKey(@Param("id") int id);


    List<FeedbackReply> findListByFeedbackId(@Param("feedbackId") long feedbackId);

    /**
     * 查询第一条回复记录
     * @param feedbackId
     * @return
     */
    FeedbackReply getFirstByFeedbackId(@Param("feedbackId") long feedbackId);
}